﻿#------------------------------------------------------------------
#add_multi_link_technology.cmake
#please dont modify this cmake
#2018年6月17日 14点18分
#------------------------------------------------------------------
SET(CONFIG_PATH "")
SET(CONFIG_FILE "")

USER_HOME(USERHOME)
IF(WIN32)
    SET(CONFIG_PATH ${USERHOME}\\.cmake)
    SET(CONFIG_FILE ${CONFIG_PATH}\\app_configure.cmake)
ELSE()
    SET(CONFIG_PATH ${USERHOME}/.cmake)
    SET(CONFIG_FILE ${CONFIG_PATH}/app_configure.cmake)
ENDIF()

IF(NOT EXISTS ${CONFIG_FILE})
    MKDIR(${CONFIG_PATH})
    EMPTY_FILE(${CONFIG_FILE})
    WRITE_LINE(${CONFIG_FILE} "SET(APP_BUILD_ROOT \"\" CACHE STRING \"用户App编译根目录\" FORCE)\n" )
    WRITE_LINE(${CONFIG_FILE} "SET(APP_DEPLOY_ROOT \"\" CACHE STRING \"用户App发布根目录\" FORCE)\n" )
    WRITE_LINE(${CONFIG_FILE} "SET(LIB_SDK_ROOT \"\" CACHE STRING \"用户LibSDK根目录\" FORCE)\n" )
ENDIF()

INCLUDE (${CONFIG_FILE})

IF( (NOT APP_BUILD_ROOT) OR (NOT APP_DEPLOY_ROOT) OR (NOT LIB_SDK_ROOT) )
    message("${CMAKE_PROJECT_NAME} multiple linking config file: ${CONFIG_FILE}")
    message("APP_BUILD_ROOT = is required, please modify ${CONFIG_FILE}")
    message("APP_DEPLOY_ROOT = is required")
    message("LIB_SDK_ROOT = is required")
    message("this cmake is under add_multi_link_technology.cmake, maybe Project struct [Other Location]")
    message(FATAL_ERROR "please check ${CONFIG_FILE}")
ENDIF()

SET (MULTILINKVER 2.0 CACHE INTERNAL "MULTILINKVER")
ADD_DEFINITIONS (-DMULTILINKVER=${MULTILINKVER})
